package com.kube.csv;

import java.util.ArrayList;
import java.util.List;

// Facade pattern to hide complexity of List
public class Line {
	List<Element> elements = null;
	
	public Line() {
		elements = new ArrayList<Element>();
	}
	
	public void add(Element e) {
		elements.add(e);
	}
	
	public Element getElement(int index) {
		if (index > size()) throw new RuntimeException("Line not found");
		return elements.get(index);
	}
	
	public int size() {
		return elements.size();
	}

}
